//
//  discountDetailCell.m
//  Wedding fantastic
//
//  Created by dllo on 15/7/7.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "discountDetailCell.h"

#define kHeight [UIScreen mainScreen].bounds.size.height
#define kWidth [UIScreen mainScreen].bounds.size.width

@implementation discountDetailCell

- (instancetype)initWithFrame:(CGRect)frame {
    [super initWithFrame:frame];
    if (self) {
        // imageView(超值折扣图片)
        self.myImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kWidth - 20 * kWidth / 375, 170 * kHeight / 667)];
        // 隐藏边框
        self.myImageView.layer.masksToBounds = YES;
        self.myImageView.layer.cornerRadius = 10;
        [self.contentView addSubview:self.myImageView];
        [_myImageView release];
        // 折扣图片标题标签
//        @property(nonatomic, retain)UILabel *titleLabel;
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10 * kWidth / 375, 120 * kHeight / 667, kWidth - 20 * kWidth / 375, 45 * kHeight / 667)];
        [self.contentView addSubview:self.titleLabel];
//        self.titleLabel.textColor = [UIColor redColor];
        // 折扣图片对应商品的实际价格标签
//        @property(nonatomic, retain)UILabel *actual_priceLabel;
        self.actual_priceLabel = [[UILabel alloc] initWithFrame:CGRectMake((kWidth - 20 * kWidth / 375) / 2, 170 * kHeight / 667, (kWidth) / 2, 25 * kHeight / 667)];
        [self.contentView addSubview:self.actual_priceLabel];
        // 折扣图片对应商品的市场价格标签
//        @property(nonatomic, retain)UILabel *market_priceLabel;
        self.market_priceLabel = [[UILabel alloc] initWithFrame:CGRectMake(10 * kWidth / 375, 170 * kHeight / 667, (kWidth - 20 * kWidth / 375) / 2, 25 * kHeight / 667)];
        [self.contentView addSubview:self.market_priceLabel];
 
    }
    return self;
}

@end
